#pragma once
#include "TextStyle.h"

class TextStyle;
class StyleItem {
public:
	StyleItem(void) {
		lineBreak = false;
		softBreak = false;
		tab = false;
		start = 0;
		length = 0;
		psc = 0;
		glyphs = 0;
		glyphCount = 0;
		clusters = 0;
		visAttrs = 0;
		advances = 0;
		goffsets = 0;
		width = 0;
		ascent = 0;
		descent = 0;
		x = 0;
		underlinePos = 0;
		underlineThickness = 0;
		strikeoutPos = 0;
		strikeoutThickness = 0;
		justify = 0;
		psla = 0;
		fallbackFont = 0;

	}
	virtual ~StyleItem(void) {}
public:
	TextStyle style;
	int start, length;
	bool lineBreak, softBreak, tab;

	///*Script cache and analysis */
	//SCRIPT_ANALYSIS analysis;
	int psc;

	/*Shape info (malloc when the run is shaped) */
	int  glyphs;
	int glyphCount;
	int clusters;
	int visAttrs;

	/*Place info (malloc when the run is placed) */
	int  advances;
	int  goffsets;
	int width;
	int ascent;
	int descent;
	int leading;
	int x;
	int underlinePos, underlineThickness;
	int strikeoutPos, strikeoutThickness;

	/* Justify info (malloc during computeRuns) */
	int  justify;

	/* ScriptBreak */
	int  psla;

	int  fallbackFont;
};
